package operation;

import book.Book;

import java.util.Scanner;

public class AddBook implements IOperation{
    @Override
    public void work(Book head) {
        Book newBook = new Book();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你要新增的图书 书号：");
        newBook.setCode(scanner.nextLine());
        System.out.println("请输入你要新增的图书 书名：");
        newBook.setName(scanner.nextLine());
        System.out.println("请输入你要新增的图书 作者：");
        newBook.setAuthor(scanner.nextLine());
        System.out.println("请输入你要新增的图书 价格：");
        newBook.setPrice(scanner.nextInt());
        System.out.println("请输入你要新增的图书 购买日期：");
        newBook.setData(scanner.nextLine());

    }
}
